In accordance with the development and spread of hardware for reproducing and storing high-resolution or high-quality video content, the need for a video codec for effectively encoding or decoding high-resolution or high-quality video content is increasing. According to a conventional video codec, a reference sample used for intra prediction is filtered through a reference sample filtering process. However, a conventional filtering technique applies a simple-type filter to a reference region according to a block size or mode. This method fails to effectively remove noise from the reference region, thus degrading prediction efficiency. Particularly, in the case of High Efficiency Video Coding (HEVC), there is a reference filtering technique in a 32×32 block; however, this only somewhat reduces a blocking artifact existing in a transform block boundary existing in a reference region in a smooth region, but also fails to effectively remove noise from the reference region. A prediction error caused by a strong edge and noise in the reference region may cause a problem of degradation of transformation efficiency.